


package mvc.command.start
{
	import flash.display.Stage;
	
	import org.puremvc.as3.interfaces.INotification;
	import mvc.InitManagers;
	import mvc.LogicCommandBase;
	import mvc.manager.ManagerCenter;
	import mvc.model.start.initInfo;
	import scene.gameScene;
	
	public class startGameCommand extends LogicCommandBase
	{
		override public function execute( notification:INotification ) : void
		{
			var _t:initInfo = notification.getBody() as initInfo;
			
			initManagers(_t._stage);
			
			addCommands();
			
			execCommands();
			
			test(_t._stage);
		}	
		
		private function initManagers(_t:Stage):void
		{
			ManagerCenter.instance.initManagers(new InitManagers(),_t);
		}
		
		private function addCommands():void
		{
		}
		
		private function execCommands():void
		{
		}
		
		private function test(s:Stage):void
		{
			var _scene:gameScene = new gameScene();				
			_scene.x = 0;
			_scene.y = 30;
			_scene.width = _scene.viewPort.x;
			_scene.height = _scene.viewPort.y;	
			
			s.addChild(_scene);
			
			_scene.load("config/test.map");
		}
	}
}